/**
 * 2016，thor.com，all rights reserved。
 * 
 * Project：		palmmall-core
 * Filename：	SPasswordInfoConverter.java
 * Created：		2016年7月30日
 * Creator：		wolv
 */
package com.thor.palmmall.rest.todo.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.todo.ATaskOperation;
import com.thor.palmmall.spi.todo.STaskOperation;

/**
 * @author wolv
 *
 */
public class ATaskOperationConverter implements Converter<STaskOperation, ATaskOperation> {

	public static ATaskOperationConverter getInstance() {
		if (instance == null)
			instance = new ATaskOperationConverter();
		return instance;
	}

	private static ATaskOperationConverter instance;

	private ATaskOperationConverter() {
	}

	@Override
	public ATaskOperation convert(STaskOperation source) {
		if (source == null)
			return null;

		ATaskOperation target = new ATaskOperation();
		target.setName(source.getName());
		target.setTitle(source.getTitle());

		return target;
	}

}
